#include<iostream>
using namespace std;
long fibonacci(int n){
    long *fib=new long [n+1];
    fib[0]=1;
    fib[1]=1;
    for(int i=2;i<=n;i++){
        fib[i]=fib[i-1]+fib[i-2];
    }
    return fib[n];
}
int main(){
    int n=9;
    for(int i=0;i<=n;i++)
    cout<<fibonacci(i)<<" ";
}